package com.edu.gcu.domain.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.edu.gcu.annotation.Excel;
import com.edu.gcu.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serial;
import java.util.Date;

/**
 * 定时任务调度日志表 sys_job_log
 *
 * @author luomang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value ="sys_job_log")
public class SysJobLog extends BaseEntity {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 任务日志ID
     */
    @Excel(name = "日志序号")
    @TableId(value = "job_log_id", type = IdType.AUTO)
    private Long jobLogId;

    /**
     * 任务名称
     */
    @Excel(name = "任务名称")
    @TableField(value = "job_name")
    private String jobName;

    /**
     * 任务组名
     */
    @Excel(name = "任务组名")
    @TableField(value = "job_group")
    private String jobGroup;

    /**
     * 调用目标字符串
     */
    @Excel(name = "调用目标字符串")
    @TableField(value = "invoke_target")
    private String invokeTarget;

    /**
     * 日志信息
     */
    @Excel(name = "日志信息")
    @TableField(value = "job_message")
    private String jobMessage;

    /**
     * 执行状态（0正常 1失败）
     */
    @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
    @TableField(value = "status")
    private String status;

    /**
     * 异常信息
     */
    @Excel(name = "异常信息")
    @TableField(value = "exception_info")
    private String exceptionInfo;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 停止时间
     */
    @TableField(value = "stop_time")
    private Date stopTime;
}
